<?php 
/**
* Banner Sliders
*/
class BannerSlider extends CWidget
{
	public function init()
	{
		# code...
	}
	
	public function run()
	{
		$criteria = new CDbCriteria();
		$sort = new CSort('Banner');
		$sort->defaultOrder=array(
			'order'=>CSort::SORT_ASC,
			'create_time'=>CSort::SORT_DESC,
		);
		$sort->applyOrder($criteria);
		$banners = Banner::model()->findAll($criteria);

		$this->render('bannerSlider', array(
			'banners'=>$banners,
		));
	}
}
?>